<?php
/**
 * <https://y.st./>
 * Copyright © 2019 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'A spiritual successor to the lost <code>yellow_beds</code> mod',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<img src="/img/CC_BY-SA_4.0/y.st./weblog/2019/05/19.jpg" alt="A utility pole, covered in nails" class="framed-centred-image" width="800" height="480"/>
<section id="diet">
	<h2>Dietary intake</h2>
	<p>
		For breakfast, I had a protein shake.
		I snacked on 493 grams of pretzels and 866 grams of mixed juice until work.
		For dinner, I had spaghetti, chopped veggie dogs, and cashew sauce, totalling 569 grams.
		After work, I tried a smoothie recipe from my dietician, and had 391 grams of it.
	</p>
</section>
<section id="drudgery">
	<h2>Drudgery</h2>
	<p>
		My discussion post for the day:
	</p>
	<blockquote>
		<p>
			I&apos;m wholly in favour of encrypting before sending <strong>*anything*</strong> to &quot;the cloud&quot; for storage.
			When you outsource storage like that, the party managing your storage for you has access to your data.
			It&apos;s not exactly a secure option in any way.
			Even if their terms of service <strong>*claim*</strong> they won&apos;t peek at your data, you shouldn&apos;t have to trust their word on that.
			And even if the cloud company is normally trustworthy, it only takes one bad actor within the company to cause you a lot of grief.
			If you make sure everything&apos;s encrypted before you send it, the cloud company can see your encrypted date, but they have no way to translate it into a useful form and cause you problems.
			By en
		</p>
	</blockquote>
</section>
<section id="Minetest">
	<h2>Minetest</h2>
	<p>
		I&apos;ve changed my mind on how to implement elemental nodes again.
		Maybe this time, I&apos;ve got it right.
	</p>
	<p>
		Anyway, being able to add an elemental spin to every node (and potentially every item in general) just isn&apos;t very useful.
		As far as digging speed and physics, the client won&apos;t be able to distinguish nodes infused with differing elemental energies.
		I can&apos;t make the ice ones slippery or the diamond ones tough, for example.
		Only the nodes that actually <strong>*do*</strong> something are interesting when given an element.
		I think I&apos;m going back to a system I started a long time ago, but lost heart in before releasing.
		But with some tweaks.
		I made a <code>yellow_beds</code> mod, but a glitch caused the Minetest engine to eat the mod.
		I had no backup copies, and I hadn&apos;t released it to the Web yet.
		I gave up, as I&apos;d almost completely finished it and didn&apos;t have the heart to program all that again.
		I reported the bug though, and it&apos;s been patched in the engine.
		It won&apos;t happen to anyone else.
		These beds let you set warp points, but you could only place as many yellow beds (and thus set as many warp points) as you&apos;d mined stacks of cotton.
		I&apos;d like to do that again, but this time, with sixteen different bed options, each infused with an element.
		The cotton one&apos;ll let you set warp points.
		Maybe the coral one will let you go back to the place you last died.
		Perhaps the sand one&apos;ll just kill you, sending you to your regular bed.
		If there&apos;s a sand one, it&apos;ll probably do something negative like that.
		Each bed will have some sort of warp-based power though, seeing as the original beds have the power to set the point you&apos;ll warp to when you die (that is, your spawn point).
	</p>
	<p>
		I think I&apos;ll start with the beds, but I&apos;ll come up with several nodes that could use some elemental energies to spice things up.
		Chests and locked chest are also something I&apos;m looking forward to tweaking.
		The basic idea though is that I&apos;ll select as many elements as I can for each thing I provide elemental versions of, and give each its own mod unless it&apos;s incredibly similar to something else that can be infused with elements.
		For example, I&apos;ll probably put the locked chest and unlocked chest in the same mod.
		The number of elements that can be used for the item will be determined by its <code>paramtype2</code> value.
		Anything that needs to be rotatable, such as beds and chests, have part of their <code>param2</code> data used for rotation, so I can only support sixteen elements.
		(I could support more with by creating a second node, which could support sixteen more, but I&apos;ll pass on that.)
		Partly-rotatable things, such as signs and ladders, will be able to support up so sixty-four elements, which is more than we currently have.
		Nodes that don&apos;t use their <code>param2</code> value for anything will be able to reach their full potential of two hundred fifty-six elements, which again, is more than we currently have and even <strong>*can*</strong> support.
		I imagine some things will only be able to support a single element, such as seaweed.
		I don&apos;t thing the drawtype it uses, which uses <code>param2</code> to determine the length of the seaweed, is able to share <code>param2</code> and squeeze in any colours.
	</p>
	<p>
		Unlike my original <code>yellow_beds</code> mod, which used a separate system for limiting the number you use, my new system will take a unified approach.
		If you enhance a bed with the cotton element, that&apos;s one less cotton elemental energy unit you can infuse, say, a chest with.
		Also, this time, it&apos;s at the point the item is created, not when it&apos;s placed into the world, that points are spent.
		You can recover points by stripping the item of its elemental properties though.
		I&apos;m most likely going to tag items with the name of the person that infused it with an element, too.
		You can&apos;t take give someone your elemental energy by giving them items and have them take the energy out of them or something.
		They&apos;ll have to earn their own elemental energies.
	</p>
	<p>
		I probably won&apos;t get to work on programming the beds until I&apos;ve decided what sixteen bed abilities I want to add, and with those, which elements to work in.
		I might or might not work on the base system in the mean time, depending on how much free time I have.
	</p>
	<p>
		Oh, yeah, I forgot to mention:
		Using all sorts of hackery, I managed to get <code>minestats</code> to count all the elements that should be counted and absolutely none of the garbage that shouldn&apos;t, without hard-coding any node names whatsoever.
		It&apos;s a mess though, and uses all sorts of arbitrary information about nodes and their drops that doesn&apos;t actually have anything to do with why the nodes and drops are actually being counted.
		That&apos;s the thing though: I have no way to access the information that actually cleanly determines what should be counted and not.
		Finding the proper list has to be done by hand, an it&apos;s using that proper list that I&apos;ve always had to reverse-engineer a working solution from.
	</p>
</section>
END
);
